/*
 * @Author: 徐建辰
 * @Date: 2022-02-14 11:20:27
 * @LastEditTime: 2022-02-14 11:43:33
 * @LastEditors: 徐建辰
 * @Description: 购物车请求模块
 */
import request from './request'

// 获取购物车列表
export const getShopCarts = params => request({
  url: '/shop-cart',
  params
})

// 添加至购物车
export const addCart = data => request({
  url: '/shop-cart',
  method: 'post',
  data
})

// 修改单个购物车数据
export const modifyCart = params => request.put('/shop-cart', params)

// 删除单个购物车
export const deleteCartItem = id => request.delete(`/shop-cart/${id}`)

// 获取id集合
export const getByCartItemIds = params => request({
  url: '/shop-cart/settle',
  params
})
